void main() {
  Person person = Person('Jack', 20);
  Student student = Student('清华', 'zhang', 22);
  student._school = '985-211';
  student.city = 'BeiJing';
  // print(person);
  // print(student);
}

class Person {
  String? name;
  int? age;

  Person(this.name, this.age);

  @override
  String toString() {
    return 'name: $name, age: $age';
  }
}

class Student extends Person {
  String? _school;
  String? city;
  String? country;
  String? funName;
  Student(
    this._school,
    String? name,
    int? age, {
    this.city,
    this.country = 'China',
  }) : funName = '$country.$city',
       super(name, age) {
    // 方法体不是必须的
  }

  @override
  String toString() {
    return 'name:$name scholl:$_school, city:$city, country:$country ${super.toString()}';
  }
}
